import Vue from 'vue'
import request from '@/itsoftUI/utils/request'
import qs from "qs";
const baseUrl = Vue.prototype.$itsoftUI.config.serviceUrl + "/apartment"

//民族api
const apiNational = {
    //列表
    List: function (search, page,) {
        const data = {
            search,
            page
        }
        return request({
            url: baseUrl + '/manageNation/list',
            method: 'post',
            data: qs.stringify(data)
        })
    },
    //提取信息
    Get: function (id) {
        const data = {
            id
        }
        return request({
            url: baseUrl + '/manageNation/get',
            method: 'post',
            data: qs.stringify(data)
        })
    },
    //编辑
    Save: function (data) {
        const config = {
            headers: { 'Content-Type': 'application/json;charset=utf-8' },
        }
        return request.post(baseUrl + '/manageNation/save', data, config)
    },
    //删除
    Del: function (ids) {
        const data = {
            ids
        }
        return request({
            url: baseUrl + '/manageNation/delete',
            method: 'post',
            data: qs.stringify(data)
        })
    },

}
export { apiNational }
